<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<title>激活</title>
<meta name="viewport"
  content="width=device-width,initial-scale=1,user-scalable=no" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link rel="stylesheet" type="text/css"
  href="/bootstrap3/css/bootstrap.css">
<link rel="stylesheet" type="text/css"
  href="/bootstrap3/font-awesome-4.7.0/css/font-awesome.css" />
<!-- 自定义样式 -->
<link rel="stylesheet" type="text/css" href="/css/layout3.css" />
<link rel="icon" href="/static/ico/favicon.ico">
<style type="text/css">
	#this{
		margin-left: 120px;
	}
</style>
</head>

<body>
  <!--注册页标题-->
  <header>
    <div class="container">
      <div class="row">
        <div class="col-md-offset-2 col-md-8">
          <h1>
            <small>欢迎使用</small> <b>掘CSDN</b> Blogs
          </h1>
        </div>
      </div>
    </div>
  </header>
  <div class="container">
    <div class="row">
      <div class="col-md-offset-2 col-md-8">
        <!--注册面板-->
        <div class="panel panel-primary">
          <!--面板标题-->
          <div class="panel-heading">
            <h3 class="panel-title">新用户激活</h3>
          </div>
          <!--面板主体-->
          <div class="panel-body">
            <!--注册表单-->
            <form id="form-act" class="form-horizontal" role="form">     
              <!-- 验证邮箱模块 -->
          		<div class="form-group">
          			<label for="email" class="col-md-2 control-label">   </label>
                	<div class="col-lg-6" >
								    <div class="input-group" >
								      <input type="text" class="form-control"id="yzm" name="yzm" placeholder="请输入验证码">
								      <span class="input-group-btn">
								        <button class="btn btn-default" id="btn-act" type="button">激活</button>
								      </span>
								    </div><!-- /input-group -->
								  </div><!-- /.col-lg-6 -->
      				</div>
            </form>
          </div>
        </div>
        <!--返回链接-->
        <div>
          <span><a href="reg.html">返回</a></span>
        </div>
      </div>
    </div>
  </div>
  <!--网页页脚-->
  <footer>
    <div class="container">
      <div class="text-center">
        Copyright © 2018 Tedu.cn All Rights Reserved <br />
        京ICP备08000853号-56 <a target="_blank" href="http://www.tedu.cn/">杭州上行集团有限公司旗下掘CSDN项目组</a>
        版权所有
      </div>
    </div>
  </footer>
</body>
<script type="text/javascript" src="/bootstrap3/jquery.min.js"></script>
<script type="text/javascript" src="/bootstrap3/js/bootstrap.js"></script>
<script type="text/javascript" src="/bootstrap3/js/holder.js"></script>
<script type="text/javascript" src="/bootstrap3/js/html5shiv.min.js"></script>
<script type="text/javascript" src="/bootstrap3/js/css3-mediaqueries.js"></script>
<script type="text/javascript" src="/bootstrap3/js/respond.min.js"></script>
<script type="text/javascript">
$("#btn-act").click(function() {
  $.ajax({
    "url" : "/user/regist/doact",
    "data" : $("#form-act").serialize(),
    "type" : "POST",
    "dataType" : "json",
    "success" : function(result) {
      if (result.status == 200) {
        // 跳转路径
        alert(result.msg);
         window.location.href = '/user/login'
      }else{
        alert(result.msg);
      }
    }
  });
});
</script>
</html>